/**
 * Created by Administrator on 2018/5/26 0026.
 */
import {
	observable,
	computed,
	autorun,
	action
} from 'mobx'

let userInfo = {
	mark:'HX',
	id: 9527,
	isFalse: [
		{name:'北京'},
		{name:'上海'}
	],
	isAdd:{
		name:'-~非洲~-'
	}
};

class AppState {
	@observable userInfo = userInfo;
	//@observable name = 'yexiaolong';
	@computed get userMsg(){
		return userInfo.mark;
	}
	@computed get isFalse(){
		return userInfo.isFalse;
	}
	@computed get isAdd(){
		return userInfo.isAdd;
	}
	// @action add(){
	// 	this.count += 1
	// }
}

const appState = new AppState();

// autorun(()=>{
// 	console.log(appState.msg);
// })
//
// setInterval(()=>{
// 	appState.add();
// }, 1000);

export default appState;